<header id="header" data-behavior="{{ .Scratch.Get "sidebarBehavior" }}">
  <i id="btn-open-sidebar" class="fa fa-lg fa-bars"></i>
  <div class="header-title">
    <a class="header-title-link" href="{{ "/" | relLangURL }}">{{ .Site.Title }}</a>
  </div>
  {{ with .Site.Params.header.rightLink }}
    {{ if and (in .url ":") (not (in .url (printf "%s" $.Site.BaseURL))) }}
      <a class="{{ if .icon }}header-right-icon {{ else }}header-right-picture {{ end }}{{ with .class }}{{ . }}{{ end }}"
         href="{{ .url | safeURL }}" target="_blank" rel="noopener">
    {{ else if .url }}
      <a class="{{ if .icon }}header-right-icon {{ else }}header-right-picture {{ end }}{{ with .class }}{{ . }}{{ end }}"
         href="{{ .url | safeURL }}">
    {{ end }}
    {{ if .icon }}
      <i class="fa fa-lg fa-{{ .icon }}"></i>
    {{ end }}
    {{ if not $.Site.Params.header.rightLink.icon }}
      {{ with ($.Scratch.Get "authorPicture") }}
        <img class="header-picture" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=90{{ end }}" alt="{{ i18n "global.author_picture" }}" />
      {{ end }}
    {{ end }}
    </a>
  {{ end }}
</header>
